package org.danng.domain;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;

import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Many;
import org.nutz.dao.entity.annotation.Readonly;
import org.nutz.dao.entity.annotation.Table;

@Table("taobao_item")
public class TaoBaoItem {
	public static TaoBaoItem getInstance(ResultSet rs) throws SQLException {
		TaoBaoItem item = new TaoBaoItem();
		item.numIid = rs.getLong("numIid");
		item.volume = rs.getLong("volume");
		item.codPostageId = rs.getLong("codPostageId");
		item.num = rs.getLong("num");
		item.postageId = rs.getLong("postageId");
		item.approveStatus = rs.getString("approveStatus");
		item.outerId = rs.getString("outerId");
		item.title = rs.getString("title");
		item.picUrl = rs.getString("picUrl");
		item.desc = rs.getString("desc");
		item.detailUrl = rs.getString("detailUrl");
		item.emsFee = rs.getString("emsFee");
		item.expressFee = rs.getString("expressFee");
		item.freightPayer = rs.getString("freightPayer");
		item.inputPids = rs.getString("inputPids");
		item.inputStr = rs.getString("inputStr");
		item.postFee = rs.getString("postFee");
		item.price = rs.getString("price");
		item.propertyAlias = rs.getString("propertyAlias");
		item.props = rs.getString("props");
		item.propsName = rs.getString("propsName");
		item.sellerCids = rs.getString("sellerCids");
		item.cid = rs.getLong("cid");
		item.delistTime = rs.getDate("delistTime");
		item.created = rs.getDate("created");
		item.listTime = rs.getDate("listTime");
		item.isTiming = rs.getBoolean("isTiming");
		item.hasDiscount = rs.getBoolean("hasDiscount");
		item.hasShowcase = rs.getBoolean("hasShowcase");
		return item;
	}

	@Id(auto = false)
	private Long numIid;
	private String outerId;
	private String title;
	private Long volume;
	private String picUrl;
	private String approveStatus;
	private Long cid;
	private Long codPostageId;
	private Date created;
	private Date delistTime;
	@Readonly
	private String desc;
	private String detailUrl;
	private String emsFee;
	private String expressFee;
	private String freightPayer;
	private Boolean hasDiscount;
	private Boolean hasShowcase;
	private String inputPids;
	private String inputStr;
	private Boolean isTiming;
	private Date listTime;
	private Long num;
	private String postFee;
	private Long postageId;
	private String price;
	private String propertyAlias;
	private String props;
	private String propsName;
	private String sellerCids;
	@Many(target = TaobaoItemSku.class, field = "numIid")
	private List<TaobaoItemSku> skus;

	public List<TaobaoItemSku> getSkus() {
		return skus;
	}

	public void setSkus(List<TaobaoItemSku> skus) {
		this.skus = skus;
	}

	public Long getNumIid() {
		return numIid;
	}

	public void setNumIid(Long numIid) {
		this.numIid = numIid;
	}

	public String getOuterId() {
		return outerId;
	}

	public void setOuterId(String outerId) {
		this.outerId = outerId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Long getVolume() {
		return volume;
	}

	public void setVolume(Long volume) {
		this.volume = volume;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}

	public String getApproveStatus() {
		return approveStatus;
	}

	public void setApproveStatus(String approveStatus) {
		this.approveStatus = approveStatus;
	}

	public Long getCid() {
		return cid;
	}

	public void setCid(Long cid) {
		this.cid = cid;
	}

	public Long getCodPostageId() {
		return codPostageId;
	}

	public void setCodPostageId(Long codPostageId) {
		this.codPostageId = codPostageId;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public Date getDelistTime() {
		return delistTime;
	}

	public void setDelistTime(Date delistTime) {
		this.delistTime = delistTime;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getDetailUrl() {
		return detailUrl;
	}

	public void setDetailUrl(String detailUrl) {
		this.detailUrl = detailUrl;
	}

	public String getEmsFee() {
		return emsFee;
	}

	public void setEmsFee(String emsFee) {
		this.emsFee = emsFee;
	}

	public String getExpressFee() {
		return expressFee;
	}

	public void setExpressFee(String expressFee) {
		this.expressFee = expressFee;
	}

	public String getFreightPayer() {
		return freightPayer;
	}

	public void setFreightPayer(String freightPayer) {
		this.freightPayer = freightPayer;
	}

	public Boolean getHasDiscount() {
		return hasDiscount;
	}

	public void setHasDiscount(Boolean hasDiscount) {
		this.hasDiscount = hasDiscount;
	}

	public Boolean getHasShowcase() {
		return hasShowcase;
	}

	public void setHasShowcase(Boolean hasShowcase) {
		this.hasShowcase = hasShowcase;
	}

	public String getInputPids() {
		return inputPids;
	}

	public void setInputPids(String inputPids) {
		this.inputPids = inputPids;
	}

	public String getInputStr() {
		return inputStr;
	}

	public void setInputStr(String inputStr) {
		this.inputStr = inputStr;
	}

	public Boolean getIsTiming() {
		return isTiming;
	}

	public void setIsTiming(Boolean isTiming) {
		this.isTiming = isTiming;
	}

	public Date getListTime() {
		return listTime;
	}

	public void setListTime(Date listTime) {
		this.listTime = listTime;
	}

	public Long getNum() {
		return num;
	}

	public void setNum(Long num) {
		this.num = num;
	}

	public String getPostFee() {
		return postFee;
	}

	public void setPostFee(String postFee) {
		this.postFee = postFee;
	}

	public Long getPostageId() {
		return postageId;
	}

	public void setPostageId(Long postageId) {
		this.postageId = postageId;
	}

	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public String getPropertyAlias() {
		return propertyAlias;
	}

	public void setPropertyAlias(String propertyAlias) {
		this.propertyAlias = propertyAlias;
	}

	public String getProps() {
		return props;
	}

	public void setProps(String props) {
		this.props = props;
	}

	public String getPropsName() {
		return propsName;
	}

	public void setPropsName(String propsName) {
		this.propsName = propsName;
	}

	public String getSellerCids() {
		return sellerCids;
	}

	public void setSellerCids(String sellerCids) {
		this.sellerCids = sellerCids;
	}

}
